home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9439 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  849 b 

  1. Path: oxy.rust.net!usenet
  2. From: Neil <neil@aol2.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Solution to my own problem!
  5. Date: Sun, 10 Mar 1996 13:26:15 -0500
  6. Organization: Almighty Online
  7. Message-ID: <31431EC7.7632@aol2.com>
  8. NNTP-Posting-Host: liv-27.rust.net
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
  13.  
  14. (Pardon the fact that there's no response to an original
  15.  message.. but I can't seem to find my original question)
  16.  
  17. Okay..
  18.  
  19. I was wondering how to take in a file and OUTPUT IT TO SCREEN
  20. (raw text/ascii file)
  21.  
  22. here goes..
  23.  {
  24.   ifstream infile("menu.htm", ios::in);
  25.   while (!infile.eof())
  26.     cout.put( (char) infile.get() );
  27.  }
  28.  
  29. What this does is take "menu.htm" and display it to the screen
  30. which is pretty useful if you're writing a CGI script/app.
  31.  
  32. Thanks,
  33. Neil
  34.